/**
 * Created with IntelliJ IDEA.
 * User:xieChao
 * Date:2022/10/3 14:57
 * 队列——先进先出
 */
public class TestDemo {
    public static void main(String[] args) {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);
        System.out.println(myQueue.peek());
        System.out.println(myQueue.poll());
    }
}
